package com.wzdigit.wms.wms.task;

import com.wzdigit.wms.wms.service.core.task.GoodsSyncService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 
 * 定时任务-产品判检
 * @author Administrator
 *
 */
@ConditionalOnExpression("${schedule.common.switch}")
@Component
public class GoodsSyncTask {
    @Autowired
    private GoodsSyncService goodsSyncService;

//    @Scheduled(cron = "0 0/5 * * * ?")
    @Scheduled(cron = "0 0/2 * * * ?")
    public void execute() {
        goodsSyncService.syncData();
    }
}